function x = plotitall()
files = dir('*.jpg');
numrows = 5;
figure
h = size(files, 1) / numrows;
for i = 1:size(files, 1)
    I = imread(files(i).name);
    center = doit(I);
    center = center.Centroid;
    rmask = false(size(I(:,:,1)));
    cc = getcc(I);
    rgs = regionprops(cc);
    numregs = size(rgs, 1);
    boxes = zeros(1, numregs);
    centers = zeros(2, numregs);
    for j = 1:numregs
        boxes(j) = rgs(j).BoundingBox(3) / rgs(j).BoundingBox(4);
        centers(:,j) = rgs(j).Centroid;
    end
    absboxes = abs(boxes - 5);
    rmask(cc.PixelIdxList{absboxes == min(absboxes)}) = true;
    rmask = [rmask false(size(I(:,:,1))) false(size(I(:,:,1)))];
    bmask = [false(size(I(:,:,1))) rmask false(size(I(:,:,1)))];
    gmask = [false(size(I(:,:,1))) false(size(I(:,:,1))) rmask];
    Imasked = I;
    Imasked(rmask) = 255;
    Imasked(bmask) = 0;
    Imasked(gmask) = 0;
    subplot(h, numrows, i),imshow(Imasked),title(files(i).name);
end